package com.ponxu.mb.model;

import com.ponxu.utils.Lang;

/**
 * 分类/标签
 * 
 * @author xwz
 */
public class Category implements java.io.Serializable {
	private static final long serialVersionUID = -8055330323019669053L;

	private int id;
	private String name;
	private String seoName;
	private String type;
	private int postCount;
	private int parentId;
	private String level;
	private int levelNum;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSeoName() {
		return seoName;
	}

	public void setSeoName(String seoName) {
		this.seoName = seoName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getPostCount() {
		return postCount;
	}

	public void setPostCount(int postCount) {
		this.postCount = postCount;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
		setLevelNum(Lang.charCountInString(level, '-') + 1);
	}

	public int getLevelNum() {
		return levelNum;
	}

	public void setLevelNum(int levelNum) {
		this.levelNum = levelNum;
	}

}
